package com.qfedu.openplateform.manager.util;

import lombok.Data;

@Data
public class JsonResultUtil {
    private Integer code;
    private String msg;
    private Long count;
    private  Object data;
    //success
    public static JsonResultUtil success(){
        JsonResultUtil jsonResultUtil = new JsonResultUtil();
        jsonResultUtil.setCode(0);
        jsonResultUtil.setMsg("success");

        return jsonResultUtil;
    }
    //fail
    public static JsonResultUtil fail(){
        JsonResultUtil jsonResultUtil = new JsonResultUtil();
        jsonResultUtil.setCode(-1);
        jsonResultUtil.setMsg("fail");

        return jsonResultUtil;
    }
}
